home *** CD-ROM | disk | FTP | other *** search
Wrap
<HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin // Put all strings here for easier translation to other languages var title = "Flare SWFlet Publish"; var swf_file="preview1.swf"; var swf_path="C:\\Program Files\\Flare\\"; var requires_cp = "The file requires Cool Page to be viewed"; var requires_cp_update = "To edit this object, please upgrade your copy of Cool Page to the latest version"; var unexpected_error = "An unexpected error occurred. Please notify http://www.imediabuilders.com"; var swfwidth=468; var swfheight=60; var current = new Array("swfwidth","swfheight","swfsize","swfloop","swfmenu","swfplay"); current["swfloop"]="true"; current["swfmenu"]="true"; current["swfplay"]="true"; var editor=window.external.GetObjectEditor("-1"); document.write( "<TITLE>" + title + "</TITLE>" ); // Not running inside Cool Page? if( !window.external || !window.external.Undefined || !window.external.Defined || (undefined = window.external.Undefined()) == (defined = window.external.Defined() )) { AlertClose( requires_cp ); } // Initialize HTML for the first time if(window.external.GetObjectHTML("-1") == defined) window.external.SetObjectSize("-1","1","1"); // Not running a version of Cool Page which supports all the APIs we use? // (note: add to this test any Cool Page APIs you call in this file) var w, h; if( defined == undefined || !window.external.GetSelectedObject || window.external.GetSelectedObject( "-1" ) == undefined || !window.external.GetObjectClass || window.external.GetObjectClass( "-1" ) != "PageHTML" || !window.external.SetObjectEditorName || window.external.SetObjectEditorName( "-1", title ) == undefined || !window.external.GetObjectWidth || (w = window.external.GetObjectWidth( "-1" )) == undefined || !window.external.GetObjectHeight || (h = window.external.GetObjectHeight( "-1" )) == undefined || !window.external.SetObjectSize || window.external.SetObjectSize( "-1", w, h ) == undefined || !window.external.GetObjectHTML || (h = window.external.GetObjectHTML( "-1" )) == undefined || !window.external.SetObjectHTML || window.external.SetObjectHTML( "-1", (h == defined ? "" : h) ) == undefined || !window.external.GetObjectFiles || window.external.GetObjectFiles( "-1", ";" ) == undefined || !window.external.SetObjectFiles // unrealistic to check all argument variants here just assume they are supported || window.external.SetObjectFiles( "-1", file0, file1, ... fileN ) == undefined || !window.external.CopyFile || window.external.CopyFile("","") == undefined ) { AlertClose( requires_cp_update ); } function AlertClose(msg) { alert(msg); document.write("<HEAD><BODY></BODY></HEAD></HTML>"); document.close(); } function ChkErr( return_value ) { if( return_value == "" || return_value == undefined ) { AlertClose( unexpected_error ); return undefined; } return return_value; } var prefix = "file:///"; var url = window.location.href; if(url.indexOf(prefix) != 0) { alert(unexpected_error); } var temp_folder=url.substring(prefix.length, url.lastIndexOf("/")).replace( /%20/g, " ").replace( /\//g, "\\"); // Return current values of HTML object function ParseHTML() { current["swfwidth"] = swfwidth; current["swfheight"] = swfheight; var html = ChkErr(window.external.GetObjectHTML("-1")); if(html==defined) return; current["swfwidth"] = ChkErr(window.external.GetObjectWidth("-1")); current["swfheight"] = ChkErr(window.external.GetObjectHeight("-1")); current["swfsize"] = "0"; s = 'current["swfsize"] = '; i = html.indexOf(s); if(i<0) alert(unexpected_error); else { s = html.substring(i+s.length); i = s.indexOf(';'); if(i<0)alert(unexpected_error); else current["swfsize"] = s.substring(1,i-1); } s = 'current["swfplay"] = '; i = html.indexOf(s); if(i<0) alert(unexpected_error); else { s = html.substring(i+s.length); i = s.indexOf(';'); if(i<0)alert(unexpected_error); else current["swfplay"] = s.substring(1,i-1); } s = 'current["swfmenu"] = '; i = html.indexOf(s); if(i<0) alert(unexpected_error); else { s = html.substring(i+s.length); i = s.indexOf(';'); if(i<0)alert(unexpected_error); else current["swfmenu"] = s.substring(1,i-1); } s = 'current["swfloop"] = '; i = html.indexOf(s); if(i<0) alert(unexpected_error); else { s = html.substring(i+s.length); i = s.indexOf(';'); if(i<0)alert(unexpected_error); else current["swfloop"] = s.substring(1,i-1); } } // Assign current values to GUI form function ReadSelectedObject( form ) { ParseHTML(); form.width.value=current["swfwidth"]; form.height.value=current["swfheight"]; form.size.selectedIndex=current["swfsize"]; if(current["swfloop"] == "true") form.swfloop.checked = 1; else form.swfloop.checked = 0; if(current["swfmenu"] == "true") form.swfmenu.checked = 1; else form.swfmenu.checked = 0; if(current["swfplay"] == "true") form.swfplay.checked = 0; else form.swfplay.checked = 1; // Copy files to TEMP folder ChkErr( window.external.CopyFile( swf_path + swf_file,temp_folder ) ); } // The HTML written to file function SWF_HTML( which ) { var w; var h; var aspect; var number; number=Math.round(100000*Math.random()); if (which==0) { if(swfwidth > 420) { w=420; aspect=420/swfwidth; h=swfheight*aspect; } else { w=swfwidth; h=swfheight; } num=""; } else { w=ChkErr(window.external.GetObjectWidth("-1")); h=ChkErr(window.external.GetObjectHeight("-1")); num=number } var t="<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\r\n"; t+=" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0\"\r\n"; t+=" id=swfmovie"+num+" width="+w+" height="+h+">\r\n"; t+="<PARAM NAME=movie VALUE=\"" + swf_file + "\" ><PARAM NAME=quality VALUE=high><PARAM NAME=scale VALUE=exactfit>\r\n"; t+="<PARAM NAME=loop VALUE=\"" + current["swfloop"] + "\">\r\n"; t+="<PARAM NAME=menu VALUE=\"" + current["swfmenu"] + "\">\r\n"; t+="<PARAM NAME=play VALUE=\"" + current["swfplay"] + "\">\r\n"; t+="<EMBED src=\"" + swf_file + "\" name=swfmovie"+num; t+=" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"\r\n"; t+=" type=\"application/x-shockwave-flash\""; t+=" menu="+current["swfmenu"]; t+=" loop="+current["swfloop"]; t+=" play="+current["swfplay"]; t+=" swLiveConnect=true scale=exactfit width="+w+" height="+h+" quality=high></EMBED>\r\n"; t+="</OBJECT>\r\n"; t+="\r\n<SCRIPT LANGUAGE=\"JavaScript\">\r\n"; t+="<!"; t+="-"; t+="-"; t+="\r\nfunction setparam"+num+"()\r\n{\r\n"; t+="var current = new Array(\"swfsize\",\"swfloop\",\"swfmenu\",\"swfplay\");\r\n"; t+="\r\ncurrent[\"swfsize\"] = \"" + window.document.editor.size.selectedIndex + "\";"; t+="\r\ncurrent[\"swfloop\"] = \"" + current["swfloop"] + "\";"; t+="\r\ncurrent[\"swfmenu\"] = \"" + current["swfmenu"] + "\";"; t+="\r\ncurrent[\"swfplay\"] = \"" + current["swfplay"] + "\";\r\n}\r\n"; t+="/"; t+="/"; t+="-"; t+="-"; t+=">"; t+="\r\n</SCRIPT>"; t+="\r\n<IMG SRC=\"t.gif\" ALT=\"\" WIDTH=1 HEIGHT=1 BORDER=0 VSPACE=0 HSPACE=0 onLoad=\"javascript:setparam"+num+"()\">"; return t; } function WriteSelectedObject( form ) { // Unable to resize object in Cool Page (and Cool Page already displayed error to user)? if( !window.external.SetObjectSize( "-1", form.width.value, form.height.value) ) return; var html=SWF_HTML(1); ParseHTML(); ChkErr(window.external.SetObjectFiles("-1")); ChkErr(window.external.SetObjectHTML("-1",html)); ChkErr(window.external.SetObjectFiles("-1",swf_path+swf_file)); } function passText(str) { if(str == "size") { window.document.editor.width.value=swfwidth; window.document.editor.height.value=swfheight; alert('Width and Height are fixed to the original SWF movie size.'); } if(str == "aspect") alert('If Width or Height are changed the other dimension will be changed to match the orginal SWF movie aspect ratio.'); if(str == "any") alert('Any size Width or Height can be entered.') WriteSelectedObject( window.document.editor ); } function widthchg(str) { if(str == "size") { window.document.editor.width.value=swfwidth; window.document.editor.height.value=swfheight; } if(str == "aspect") window.document.editor.height.value=Math.round((window.document.editor.width.value)*(swfheight/swfwidth)); WriteSelectedObject( window.document.editor ); } function checkboxes() { if(window.document.editor.swfmenu.checked == true) current["swfmenu"] = "true"; else current["swfmenu"] = "false"; if(window.document.editor.swfloop.checked == true) current["swfloop"] = "true"; else current["swfloop"] = "false"; if(window.document.editor.swfplay.checked == true) current["swfplay"] = "false"; else current["swfplay"] = "true"; WriteSelectedObject( window.document.editor ); } function heightchg(str) { if(str == "size") { window.document.editor.width.value=swfwidth; window.document.editor.height.value=swfheight; } if(str == "aspect") window.document.editor.width.value=Math.round((window.document.editor.height.value)*(swfwidth/swfheight)); WriteSelectedObject( window.document.editor ); } // End --> </SCRIPT> </HEAD> <STYLE TYPE="text/css">TD {font:normal 10pt Arial, sans-serif; color:#ffff00}</STYLE> <BODY SCROLL="auto" bgcolor="666699" text="000000" VLINK="#f0f0f0" ALINK="#ffcc00" LINK="#f0f0f0"> <center> <center><table BORDER CELLSPACING=0 > <tr> <td BGCOLOR="#00CCCC"> <font color="#0000CC"><b><font size=+3>iMB</font></b><sup><font size=+1>TM</font></sup></font></td> <td BGCOLOR="#FFFFFF"> <b><i><font face="arial"><font color="#DD3300"><font size=+3>Flare</font><sup><font size=+1>TM</font></sup><font size=+3> Products</font></font></font></i></b></td> </tr> </table></center> <center><b><i><font face="arial, helvetica"><font color="#D9D9D9"><font size=-1>Creating and Publishing Flash for Cool Page.</font></font></font></i></b></center> <center> <font face="arial, helvetica" size=2 color="D9D9D9"> <br><b>Visit <a href="http://www.imediabuilders.com" target="imediawin">iMEDIA Builders</a> for help creating Flash for Cool Page.</b></font><br><br> <FORM NAME="editor" ACTION=""> <center><table border=1 bgcolor="DDDDd0"><tr><td> <table border=0 cellspacing=0 cellpadding=4> <tr> <td><font face="arial, helvetica" size=2 color="000000"><b>Preview Controls:</td></b></font> <td><input type=button value=Rewind name=sfwrewind onclick="javascript:window.document.swfmovie.rewind()"> <input type=button value=Play name=sfwplay onclick="javascript:window.document.swfmovie.play()"> <input type=button value=Pause name=sfwpause onclick="javascript:window.document.swfmovie.StopPlay()"></td> </tr> <tr> <td><font color="000000"><b>Play Settings:</td></b></font> <td><input type=checkbox name=swfplay onclick="javascript:checkboxes();"><font color="000000"><b>Paused at Start </b></font> <input type=checkbox name=swfloop onclick="javascript:checkboxes();"><font color="000000"><b>Loop </b></font> <input type=checkbox name=swfmenu onclick="javascript:checkboxes();"><font color="000000"><b>Menu </b></font></td> </tr> <tr> <td><font color="000000"><b>Dimensions:</b></font></td> <td><select name="size" onchange="javascript:passText(this.options[this.selectedIndex].value)"> <option value="size" selected>Original Size <option value="aspect">Original Aspect <option value="any">Any Size</select> <font face="arial, helvetica" size=2 color="000000"><b>W</b></font> <input type="text" size=4 maxlength=4 name=width value=" " onChange="javascript:widthchg(this.form.size.value);"> <font color="000000"><b>H</b></font> <input type="text" size=4 maxlength=4 name=height value=" " onChange="javascript:heightchg(this.form.size.value);"> <center><font size=1 face="arial" color="000000"><b>The preview size below may not match edited dimensions</b></font></center> </td></tr></table> </FORM> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin ReadSelectedObject( document.editor ); document.write( SWF_HTML( 0 ) ); if(window.external.GetObjectHTML("-1")==defined) WriteSelectedObject( document.editor ); // End --> </SCRIPT> </table> </center> <!--Start Promotional Stuff --> <br><table width=420 cellspadding=0 cellspacing=0 > <tr><td><font face="arial, helvetica" size=2 color="D9D9D9"><b> Flare files are created by <a href="http://www.imediabuilders.com" target="imediawin">iMEDIA Builders</a> for publishing with Cool Page. iMEDIA Builders.com and CoolPage.com are owned by separate companies. <p>All Flash (SWF) movies published with a FlareSWFlet, FlareExpress, or FlareWorks are compatible with CoolPage's drag-n-drop, resizing, positioning, publishing and unlimited undo features. <p>iMEDIA Builders has <a href="http://www.swflets.com">Flare SWFlets</a> to easily create Text Effects, Ad Banners, and Animation Clips including the ability to custom scale, opacity, rotate, motion paths, and other effects. You can pick the font type, size, color, load any GIF or JPG image and set the URL link. Please visit <a href="http://www.imediabuilders.com" target="imediawin"> iMEDIA Builders</a> to view and download Flare Products and free Flash animation templates. </font> </td></tr></table></center> <!--End Promotional Stuff --> </BODY> </HTML>